<?php
class StudentAction extends Action
{
   
    /**
    +----------------------------------------------------------
    *教师信息列表
    +----------------------------------------------------------
    */
    public function stulist()
    {
         $stulist=M("student");
         $stulist_result=$stulist->field("stu_id,stu_name,stu_sex,stu_school,stu_phone,stu_email")->select();
         $this->assign("stulistshow",$stulist_result);
         $this->display();
    }
     /**
    +----------------------------------------------------------
    *删除教师信息
    +----------------------------------------------------------
    */
      public function studel()
    {
        $studel=M("student");
        if(isset($_GET['d_id']))
        {
            $d_id=$_GET['d_id'];
            $del_result=$studel->where("stu_id=$d_id")->delete();
            if($del_result)
            {
                $this->assign("jumpUrl","__URL__/stulist");
                $this->success("信息删除成功!");
            }
        }

     }
      /**
    +----------------------------------------------------------
    *预约信息列表
    +----------------------------------------------------------
    */
    public function reslist()
    {
         $relist=M("reserve");
         $relist_result=$relist->select();
         $this->assign("relistshow",$relist_result);
         $this->display(relist);
    }
     /**
    +----------------------------------------------------------
    *删除预约信息
    +----------------------------------------------------------
    */
      public function redel()
    {
        $redel=M("reserve");
        if(isset($_GET['d_id']))
        {
            $d_id=$_GET['d_id'];
            $del_result= $redel->where("re_id=$d_id")->delete();
            if($del_result)
            {
                $this->assign("jumpUrl","__URL__/relist");
                $this->success("信息删除成功!");
            }
        }

     }

}
?>
